package vsvm.data.filter.ranking;

import java.io.Serializable;
import vsvm.data.model.AbstractDataModel;

public abstract class AbstractRankingFilter implements Serializable{

	private static final long serialVersionUID = 100L;
	protected AbstractDataModel dataModel;

	// returns the scores of the ranked data model
	public abstract double[] score();
	
	public void setDataModel(AbstractDataModel model) {
		dataModel = model;
	}
	
	protected double[] allFeatureValues(int featureNumber) {
		int numVectors = dataModel.getVectorCount();
		double[] values = new double[numVectors];
		for(int i = 0; i < numVectors; i++){
			values[i] = dataModel.getVector(i)[featureNumber];
		}
		return values;
	}

}